//公共緩存類

//设置全局KEY
function setCache(key, val,callback) {
  sessionStorage.setItem(key,val);
}

//获取全局KEY
function getCache(key) {
  return sessionStorage.getItem(key);;
}

//清理本地数据缓存
function clearCache(){
  sessionStorage.clear();
}

//註冊模塊
module.exports = {
  setCache: setCache,
  getCache: getCache,
  clearCache: clearCache
}